<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layui/common/commonHead :: commonHead(~{::title},~{},~{})">
    <title>菜单管理</title>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <form class="layui-form" id="res-list-search-form">
            <div class="layui-card-header layuiadmin-card-header-auto">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">菜单名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" placeholder="请输入资源名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                </div>
            </div>

            <div class="layui-card-body">
                <div style="padding-bottom: 10px;">
                    <div class="layui-table-tool-temp">
                        <button type="button" class="layui-btn layuiadmin-btn-useradmin" data-type="add">
                            <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加
                        </button>
                        <button type="button" class="layui-btn layuiadmin-btn-useradmin" data-type="batchDel">
                            <i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>批量删除
                        </button>
                        <button type="button" class="layui-btn layuiadmin-btn-dict toolbar-button" data-type="open">
                            展开/关闭
                        </button>
                    </div>
                    <div class="layui-table-tool-self">
                        <button type="button" data-type="reload" class="layui-btn layuiadmin-btn-useradmin toolbar-button" id="resource_search" lay-filter="resource_search">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索
                        </button>
                        <button type="reset" data-type="reset" class="layui-btn  layui-btn-primary toolbar-button" lay-filter="">
                            <i class="layui-icon layuiadmin-button-btn"></i>重置
                        </button>
                    </div>
                </div>
            </div>
        </form>

        <table lay-even id="menu_list_table" lay-size="sm" lay-filter="menu_list_table"></table>
        <script type="text/html" id="resource-list-toolbar">
            <a class="layui-btn layui-btn-xs" lay-event="add">添加</a>
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </script>
    </div>
</div>
<script type="text/html" id="imgTpl">
    <img style="display: inline-block; width: 50%; height: 100%;" src={{ d.avatar }}>
</script>
<script type="text/html" id="statusTpl">
    <input type="checkbox" name="status" value="{{d.enable}}" lay-skin="switch" lay-text="正常|锁定" disabled lay-filter="statusSwitch" {{ d.status == '1' ? 'checked' : '' }}>
</script>

<script type="text/html" id="typeTpl">
        <span  class="layui-badge layui-bg-orange {{ d.type == '1' ? '' : 'layui-hide' }}"  >菜单</span>
        <span  class="layui-badge layui-bg-green {{ d.type == '2' ? '' : 'layui-hide' }}"  >按钮</span>
        <span  class="layui-badge layui-bg-blue {{ d.type == '3' ? '' : 'layui-hide' }}"  >接口</span>
</script>
<div th:replace="layui/common/commonJs :: commonJs(~{})"></div>
<script>
    layui.use(['index', 'menu'], function () {});
</script>
</body>
</html>
